<?php
namespace app\validate;

use think\Validate;

class CheckGoods extends Validate
{
    protected $rule =   [
        'title'  => 'require|length:1,50',
        'e_title'  => 'require|length:1,50',
        'image'  => 'require',
        'type'  => 'require',
        'integral'  => 'require|number',
    ];

    protected $message  =   [
        'title.require' => '请输入商品名称！',
        'title.length' => '商品名称在1-50个字符！',
        'e_title.require' => '请输入Title(EN)！',
        'e_title.length' => 'Title(EN)在1-50个字符！',
        'image.require' => '请上传商品！',
        'type.require' => '请选择商品类型！',
        'integral.require' => '请填写兑换积分！',
        'integral.number' => '兑换积分为数字！',
    ];

}